//
//  TableViewDelegate.m
//  ImageReplacer
//
//  Created by Tyler Powell on 5/7/12.
//  Copyright (c) 2012 Georgia Institute of Technology. All rights reserved.
//

#import "TableViewDelegate.h"

@implementation TableViewDelegate
@synthesize imageTable;

-(void) tableViewSelectionDidChange:(NSNotification *)notification
{
    NSTableView *notifiedTable = [notification object];
    if ([notifiedTable selectedRow]>=0) {
        /*
        NSLog(@"IMHERE");
        if ([imageTable imageView]) {
            NSLog(@"Yay");
        }
         */
        [[notifiedTable imageView] setSelectedImage:notifiedTable];
        [notifiedTable saveSelection:notifiedTable];
    }
}
@end
